package com.hoshiicloud.saleorder.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hoshiicloud.saleorder.entity.OrderMain;
import com.hoshiicloud.saleorder.dto.OrderMultiConditionDTO;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 订单信息 Mapper 接口
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-03
 */
public interface OrderMainMapper extends BaseMapper<OrderMain> {

    /**
     * 根据主单id 多条件查询订单信息
     *
     * @param maps 参数信息
     * @return 返回基本信息
     */
    List<Map<String, Object>> multiConditionQueryOrderByMainNo(@Param("maps") Map<String, Object> maps,
            @Param("orderMainId") String orderMainId);

    /**
     * 分组查询订单id
     *
     * @param page 分页对象
     * @param paramMap 条件查询
     * @return Integer
     */
    List<String> multiConditionQueryOrderMainGroup(IPage<OrderMultiConditionDTO> page,
            @Param("maps") Map<String, Object> paramMap);

    /**
     * 分组查询订单id总数
     *
     * @param paramMap 条件查询
     * @return Integer
     */
    List<String> multiConditionQueryOrderMainGroup(@Param("maps") Map<String, Object> paramMap);

    /**
     * Query for the goods properties values table according to {@code specId}
     *
     * @param specId specId
     * @return String
     */
    String selectGoodsSkuValue(@Param("specId") String specId);

    /**
     * Query for the order value table according to {@code orderMainNo}
     *
     * @param orderMainNo main order table number
     * @return order information list
     */
    List<Map<String, Object>> orderInfoDetailsQuery(@Param("orderMainNo") String orderMainNo,
            @Param("shippingId") String shippingId);

}
